package xyz.thoughtset.viewer.modules.ds.jdbc.mysql.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import xyz.thoughtset.viewer.common.connector.entity.bo.Linker;
import xyz.thoughtset.viewer.modules.ds.jdbc.core.constant.SupportTypeConstant;
import xyz.thoughtset.viewer.modules.ds.jdbc.core.factory.MybatisSqlQueryExecutor;
import xyz.thoughtset.viewer.modules.ds.jdbc.core.linker.JdbcConnBuilder;

@Configuration
public class MysqlDsConfig {

    @Bean
    public JdbcConnBuilder mysqlConnBuilder() {
        Linker dataLinker = new Linker(
                "mysql",
                "com.mysql.cj.jdbc.Driver",
                SupportTypeConstant.SUPPORT_TYPE
        );
        return new JdbcConnBuilder(dataLinker);
    }

}
